{{extend "cron_layout.html"}}

{{block content_main}}
<style type="text/css">
#workflow {
  width: 100%;
  height: 450px;
  border: 1px solid lightgray;
}
</style>

<t:bs.breadcrumb>
    <a href="/cron" title="返回"></a>
    <a href="/cron/{{=job.id}}" title="JOB: {{=job.title}}"></a>
    <a active="active" title="任务工作流图"></a>
</t:bs.breadcrumb>

<div id="workflow"></div>

{{use 'vis'}}
{{link 'cron/show_workflow.js'}}

<script>

var job_id = {{=job.id}};

$(function(){
    var options = {
        url:'/cron/'+job_id+'/view'+'?action=get_tasks'
    };
    var workflow = show_workflow('workflow', options);
    /* 增加是否启动任务的功能
    workflow.on('doubleClick', function(params){
        var node = get_node(params.nodes[0]);
        window.open('/async_tasks/view/'+node.async_task);
    });
    */

});

</script>

{{end}}